home *** CD-ROM | disk | FTP | other *** search
/ Champak 40 / Vol 40.iso / games / ws_tetri.swf / scripts / %3Cdefault package%3E / mc_vButton.as next >
Encoding:
Text File  |  2007-03-21  |  904 b   |  38 lines

  1. function vButton()
  2. {
  3.    this.init(this.rb1);
  4. }
  5. vButton.prototype = new MovieClip();
  6. Object.registerClass("mc_vButton",vButton);
  7. v = vButton.prototype;
  8. v.init = function(rButton)
  9. {
  10.    var _loc1_ = this;
  11.    _loc1_.rButton = rButton;
  12.    _loc1_.rButton.gotoAndStop("over");
  13.    _loc1_.rbAktiv = rButton;
  14. };
  15. v.buttonWechsel = function(rButton, wert)
  16. {
  17.    var _loc1_ = this;
  18.    _loc1_.rButton = rButton;
  19.    _loc1_.rbAktiv.gotoAndStop("normal");
  20.    _loc1_.rButton.gotoAndStop("over");
  21.    _loc1_.rbAktiv = rButton;
  22.    _root.vorschau.aktiv = wert;
  23. };
  24. v.onMouseDown = function()
  25. {
  26.    var _loc1_ = this;
  27.    var _loc3_ = _root._xmouse;
  28.    var _loc2_ = _root._ymouse;
  29.    if(_loc1_.bg1.hitTest(_loc3_,_loc2_,false))
  30.    {
  31.       _loc1_.buttonWechsel(_loc1_.rb1,true);
  32.    }
  33.    else if(_loc1_.bg2.hitTest(_loc3_,_loc2_,false))
  34.    {
  35.       _loc1_.buttonWechsel(_loc1_.rb2,false);
  36.    }
  37. };
  38.